package com.atguigu.spzx.order;

import com.atguigu.anno.EnableGetCurrentUserAuthCheck;
import com.atguigu.anno.EnableGlobalExceptionHandler;
import com.atguigu.anno.EnableUserTokenFeignInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@MapperScan(basePackages = "com.atguigu.spzx.order.mapper")
@EnableGlobalExceptionHandler
@EnableGetCurrentUserAuthCheck
@EnableTransactionManagement
@EnableFeignClients(basePackages = {"com.atguigu.cart.feign", "com.atguigu.product.feign", "com.atguigu.spzx.user.client"})
// 开启openfeign的拦截器，需要在request header中加入token
@EnableUserTokenFeignInterceptor
public class OrderApplication {
    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }
}
